﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EditPlatformTool
{
    public class FolderProcess
    {
        private FolderBrowserDialog m_folderBrowser;
        private String _Path = "";

        private static FolderProcess m_pInstnace = null;
        private FolderProcess() { }
        public static FolderProcess GetInstance()
        {
            if (m_pInstnace == null)
                m_pInstnace = new FolderProcess();
            return m_pInstnace;
        }

        public void Show()
        {
            LogControl.PrintLog(LogControl.LogType.Info, "Open folder browser dialog");
            m_folderBrowser = new FolderBrowserDialog();
            DialogResult result = m_folderBrowser.ShowDialog();
            if (result == DialogResult.OK)
                _Path = m_folderBrowser.SelectedPath;
        }
        public String GetPath()
        {
            String path = _Path;
            _Path = "";
            return path;
        }
    }
}
